package com.carrent;

import com.carrent.sys.filter.DruidStatFilter;
import com.carrent.sys.listener.AppListener;
import com.carrent.sys.servlet.DruidStatViewServlet;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
@ServletComponentScan
//@MapperScan(value = {"com.carrent.sys.mapper","com.carrent.bus.mapper"})
/**
 * springboot启动类
 * */
public class CarRentApplication {
    public static void main(String[] args) {
        SpringApplication.run(CarRentApplication.class, args);


    }


    @Bean
    public ServletListenerRegistrationBean<AppListener> myServletListener() {
        ServletListenerRegistrationBean<AppListener> myListener = new ServletListenerRegistrationBean<AppListener>();
        myListener.setListener(new AppListener());
        return myListener;
    }


}
